///////////////////////////////////////////////////////////////////////////////////
//
// Writer  : Dong-moon Lim, Dept. of Messenger, SK Communications, Korea
//
// Email   : dmlim@nate.com
//
// Created : 2009-03-31 09:48:00
//
// Description
//		Co-Operation Ticket Module
//
///////////////////////////////////////////////////////////////////////////////////

#ifndef __COTICKET_H__
#define __COTICKET_H__

#include <string>
#include <map>

namespace COTICKET
{
	class CoTicket
	{
	protected:
		std::map<std::string, std::string> m_properties;
		char* m_charset;
		char* m_ticket;

	public:
		CoTicket(const char* charset = NULL);
		~CoTicket();
		std::map<std::string, std::string>& getProperties();
		void setProperties(std::map<std::string, std::string>&);
		const char* getProperty(const char* key);
		void setProperty(const char* key, const char* value);
		bool setTicket(const char* password, const char* ticket, bool isCheckTimeout = false);
		const char* getTicket(const char* password, unsigned long timeoutSeconds, bool isURL = true);
	};
}

#endif // __COTICKET_H__
